.class public Lorg/zeam/Dock;
.super Landroid/widget/LinearLayout;
.source "Dock.java"

# interfaces
.implements Landroid/view/View$OnLongClickListener;
.implements Lorg/zeam/DropTarget;
.implements Lorg/zeam/DragSource;
.implements Lorg/zeam/DragController$DragListener;


# static fields
.field private static final POSITION_CENTER:Ljava/lang/String; = "CENTER"

.field private static final POSITION_END:Ljava/lang/String; = "END"

.field private static final POSITION_START:Ljava/lang/String; = "START"

.field static final WIDTH_LARGE:I = 0x2

.field static final WIDTH_MEDIUM:I = 0x1

.field static final WIDTH_SMALL:I


# instance fields
.field private mCellHeight:I

.field private mCellWidth:I

.field private mDragController:Lorg/zeam/DragController;

.field private mItemHolder:Landroid/widget/LinearLayout;

.field private mLauncher:Lorg/zeam/Launcher;

.field private mOrientation:I

.field private mScrollView:Landroid/view/View;

.field private mSelectedView:Landroid/view/View;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2
    .parameter "context"

    .prologue
    const/16 v1, 0x14

    .line 46
    invoke-direct {p0, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 27
    const/4 v0, 0x1

    iput v0, p0, Lorg/zeam/Dock;->mOrientation:I

    .line 34
    iput v1, p0, Lorg/zeam/Dock;->mCellWidth:I

    .line 35
    iput v1, p0, Lorg/zeam/Dock;->mCellHeight:I

    .line 47
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 4
    .parameter "context"
    .parameter "attrs"

    .prologue
    const/16 v1, 0x14

    const/4 v3, 0x1

    const/4 v2, 0x0

    .line 51
    invoke-direct {p0, p1, p2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 27
    iput v3, p0, Lorg/zeam/Dock;->mOrientation:I

    .line 34
    iput v1, p0, Lorg/zeam/Dock;->mCellWidth:I

    .line 35
    iput v1, p0, Lorg/zeam/Dock;->mCellHeight:I

    .line 52
    sget-object v1, Lorg/zeam/R$styleable;->Dock:[I

    invoke-virtual {p1, p2, v1, v2, v2}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;

    move-result-object v0

    .line 53
    .local v0, typedArray:Landroid/content/res/TypedArray;
    iget v1, p0, Lorg/zeam/Dock;->mCellHeight:I

    invoke-virtual {v0, v3, v1}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I

    move-result v1

    iput v1, p0, Lorg/zeam/Dock;->mCellHeight:I

    .line 54
    iget v1, p0, Lorg/zeam/Dock;->mCellWidth:I

    invoke-virtual {v0, v2, v1}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I

    move-result v1

    iput v1, p0, Lorg/zeam/Dock;->mCellWidth:I

    .line 55
    const/4 v1, 0x2

    iget v2, p0, Lorg/zeam/Dock;->mOrientation:I

    invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getInt(II)I

    move-result v1

    iput v1, p0, Lorg/zeam/Dock;->mOrientation:I

    .line 56
    return-void
.end method

.method private declared-synchronized addItemView(Lorg/zeam/ItemInfo;)V
    .locals 1
    .parameter "itemInfo"

    .prologue
    .line 185
    monitor-enter p0

    const/4 v0, -0x1

    :try_start_0
    invoke-direct {p0, p1, v0}, Lorg/zeam/Dock;->addItemViewAt(Lorg/zeam/ItemInfo;I)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 186
    monitor-exit p0

    return-void

    .line 185
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method private declared-synchronized addItemViewAt(Lorg/zeam/ItemInfo;I)V
    .locals 10
    .parameter "itemInfo"
    .parameter "position"

    .prologue
    .line 190
    monitor-enter p0

    const/4 v5, 0x0

    .line 191
    .local v5, view:Landroid/view/View;
    :try_start_0
    iget v6, p1, Lorg/zeam/ItemInfo;->itemType:I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    packed-switch v6, :pswitch_data_0

    .line 233
    :goto_0
    :pswitch_0
    monitor-exit p0

    return-void

    .line 193
    :pswitch_1
    :try_start_1
    iget-object v7, p0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    const v8, 0x7f030015

    .line 194
    move-object v0, p1

    check-cast v0, Lorg/zeam/ApplicationsGridItemInfo;

    move-object v6, v0

    .line 193
    invoke-virtual {v7, v8, p0, v6}, Lorg/zeam/Launcher;->createSmallApplicationsGridItem(ILandroid/view/ViewGroup;Lorg/zeam/ApplicationsGridItemInfo;)Landroid/view/View;

    move-result-object v5

    .line 215
    :goto_1
    invoke-virtual {p0}, Lorg/zeam/Dock;->getContext()Landroid/content/Context;

    move-result-object v1

    .line 216
    .local v1, context:Landroid/content/Context;
    const/4 v6, 0x1

    invoke-static {v1, v6}, Lorg/zeam/SelectorDrawable;->createSelector(Landroid/content/Context;Z)Lorg/zeam/SelectorDrawable;

    move-result-object v4

    .line 218
    .local v4, selectorDrawable:Landroid/graphics/drawable/Drawable;
    move-object v0, v5

    check-cast v0, Landroid/widget/ImageView;

    move-object v2, v0

    .line 219
    .local v2, imageView:Landroid/widget/ImageView;
    iget v6, p0, Lorg/zeam/Dock;->mCellHeight:I

    invoke-virtual {v2, v6}, Landroid/widget/ImageView;->setMinimumHeight(I)V

    .line 220
    iget v6, p0, Lorg/zeam/Dock;->mCellWidth:I

    invoke-virtual {v2, v6}, Landroid/widget/ImageView;->setMinimumWidth(I)V

    .line 222
    const/4 v6, 0x1

    invoke-virtual {v5, v6}, Landroid/view/View;->setLongClickable(Z)V

    .line 223
    invoke-virtual {v5, p0}, Landroid/view/View;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    .line 224
    invoke-virtual {v5, v4}, Landroid/view/View;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 226
    const/4 v6, -0x1

    if-ne p2, v6, :cond_1

    .line 227
    iget-object v6, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v6, v5}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 231
    :goto_2
    iget-object v6, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v6}, Landroid/widget/LinearLayout;->invalidate()V

    .line 232
    invoke-virtual {p0}, Lorg/zeam/Dock;->invalidate()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    .line 190
    .end local v1           #context:Landroid/content/Context;
    .end local v2           #imageView:Landroid/widget/ImageView;
    .end local v4           #selectorDrawable:Landroid/graphics/drawable/Drawable;
    :catchall_0
    move-exception v6

    monitor-exit p0

    throw v6

    .line 198
    :pswitch_2
    :try_start_2
    iget-wide v6, p1, Lorg/zeam/ItemInfo;->container:J

    const-wide/16 v8, -0x1

    cmp-long v6, v6, v8

    if-nez v6, :cond_0

    .line 199
    new-instance v3, Lorg/zeam/ApplicationItemInfo;

    move-object v0, p1

    check-cast v0, Lorg/zeam/ApplicationItemInfo;

    move-object v6, v0

    invoke-direct {v3, v6}, Lorg/zeam/ApplicationItemInfo;-><init>(Lorg/zeam/ApplicationItemInfo;)V

    .end local p1
    .local v3, itemInfo:Lorg/zeam/ItemInfo;
    move-object p1, v3

    .line 201
    .end local v3           #itemInfo:Lorg/zeam/ItemInfo;
    .restart local p1
    :cond_0
    iget-object v7, p0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    const v8, 0x7f030015

    move-object v0, p1

    check-cast v0, Lorg/zeam/ApplicationItemInfo;

    move-object v6, v0

    invoke-virtual {v7, v8, p0, v6}, Lorg/zeam/Launcher;->createSmallShortcut(ILandroid/view/ViewGroup;Lorg/zeam/ApplicationItemInfo;)Landroid/view/View;

    move-result-object v5

    .line 202
    goto :goto_1

    .line 204
    :pswitch_3
    iget-object v7, p0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    const v8, 0x7f030015

    move-object v0, p1

    check-cast v0, Lorg/zeam/LiveFolderInfo;

    move-object v6, v0

    invoke-virtual {v7, v8, p0, v6}, Lorg/zeam/Launcher;->createSmallLiveFolder(ILandroid/view/ViewGroup;Lorg/zeam/LiveFolderInfo;)Landroid/view/View;

    move-result-object v5

    .line 205
    goto :goto_1

    .line 207
    :pswitch_4
    iget-object v7, p0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    const v8, 0x7f030015

    move-object v0, p1

    check-cast v0, Lorg/zeam/UserFolderInfo;

    move-object v6, v0

    invoke-virtual {v7, v8, p0, v6}, Lorg/zeam/Launcher;->createSmallFolder(ILandroid/view/ViewGroup;Lorg/zeam/UserFolderInfo;)Landroid/view/View;

    move-result-object v5

    .line 208
    goto :goto_1

    .line 229
    .restart local v1       #context:Landroid/content/Context;
    .restart local v2       #imageView:Landroid/widget/ImageView;
    .restart local v4       #selectorDrawable:Landroid/graphics/drawable/Drawable;
    :cond_1
    iget-object v6, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v6, v5, p2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto :goto_2

    .line 191
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_2
        :pswitch_2
        :pswitch_4
        :pswitch_3
        :pswitch_0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method private removeSelectedItem(Z)V
    .locals 14
    .parameter "deleteItemFromDatabase"

    .prologue
    const/4 v5, -0x1

    .line 369
    iget-object v1, p0, Lorg/zeam/Dock;->mSelectedView:Landroid/view/View;

    if-nez v1, :cond_0

    .line 402
    :goto_0
    return-void

    .line 372
    :cond_0
    iget-object v1, p0, Lorg/zeam/Dock;->mSelectedView:Landroid/view/View;

    invoke-virtual {v1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v11

    check-cast v11, Lorg/zeam/ItemInfo;

    .line 373
    .local v11, itemInfo:Lorg/zeam/ItemInfo;
    invoke-static {}, Lorg/zeam/Launcher;->getModel()Lorg/zeam/LauncherModel;

    move-result-object v12

    .line 375
    .local v12, launcherModel:Lorg/zeam/LauncherModel;
    if-eqz p1, :cond_2

    .line 376
    instance-of v1, v11, Lorg/zeam/UserFolderInfo;

    if-eqz v1, :cond_1

    .line 378
    move-object v0, v11

    check-cast v0, Lorg/zeam/UserFolderInfo;

    move-object v13, v0

    .line 379
    .local v13, userFolderInfo:Lorg/zeam/UserFolderInfo;
    iget-object v1, p0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    invoke-static {v1, v13}, Lorg/zeam/LauncherModel;->deleteUserFolderContentsFromDatabase(Landroid/content/Context;Lorg/zeam/UserFolderInfo;)V

    .line 380
    invoke-virtual {v12, v13}, Lorg/zeam/LauncherModel;->removeUserFolder(Lorg/zeam/UserFolderInfo;)V

    .line 382
    .end local v13           #userFolderInfo:Lorg/zeam/UserFolderInfo;
    :cond_1
    iget-object v1, p0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    invoke-static {v1, v11}, Lorg/zeam/LauncherModel;->deleteItemFromDatabase(Landroid/content/Context;Lorg/zeam/ItemInfo;)V

    .line 384
    :cond_2
    invoke-virtual {v12, v11}, Lorg/zeam/LauncherModel;->removeDesktopItem(Lorg/zeam/ItemInfo;)V

    .line 385
    iget-object v1, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    iget-object v3, p0, Lorg/zeam/Dock;->mSelectedView:Landroid/view/View;

    invoke-virtual {v1, v3}, Landroid/widget/LinearLayout;->removeView(Landroid/view/View;)V

    .line 387
    iget-object v1, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v1}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v9

    .line 388
    .local v9, count:I
    const/4 v10, 0x0

    .local v10, i:I
    :goto_1
    if-lt v10, v9, :cond_3

    .line 400
    invoke-virtual {p0}, Lorg/zeam/Dock;->requestLayout()V

    .line 401
    const/4 v1, 0x0

    iput-object v1, p0, Lorg/zeam/Dock;->mSelectedView:Landroid/view/View;

    goto :goto_0

    .line 389
    :cond_3
    iget-object v1, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v1, v10}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v8

    .line 390
    .local v8, cell:Landroid/view/View;
    invoke-virtual {v8}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lorg/zeam/ItemInfo;

    .line 391
    .local v2, info:Lorg/zeam/ItemInfo;
    iget v1, v2, Lorg/zeam/ItemInfo;->cellX:I

    iget v3, v11, Lorg/zeam/ItemInfo;->cellX:I

    if-le v1, v3, :cond_4

    .line 393
    iget v1, v2, Lorg/zeam/ItemInfo;->cellX:I

    const/4 v3, 0x1

    sub-int/2addr v1, v3

    iput v1, v2, Lorg/zeam/ItemInfo;->cellX:I

    .line 394
    invoke-virtual {v8, v2}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 395
    iget-object v1, p0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    .line 396
    const-wide/16 v3, -0xc8

    iget v6, v2, Lorg/zeam/ItemInfo;->cellX:I

    move v7, v5

    .line 395
    invoke-static/range {v1 .. v7}, Lorg/zeam/LauncherModel;->moveItemInDatabase(Landroid/content/Context;Lorg/zeam/ItemInfo;JIII)V

    .line 388
    :cond_4
    add-int/lit8 v10, v10, 0x1

    goto :goto_1
.end method

.method private updateItemsInDatabase()V
    .locals 10

    .prologue
    const/4 v4, -0x1

    .line 352
    iget-object v0, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->forceLayout()V

    .line 353
    iget-object v0, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->invalidate()V

    .line 355
    iget-object v0, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v8

    .line 356
    .local v8, count:I
    const/4 v9, 0x0

    .local v9, i:I
    :goto_0
    if-lt v9, v8, :cond_0

    .line 365
    return-void

    .line 358
    :cond_0
    iget-object v0, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v9}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v7

    .line 359
    .local v7, child:Landroid/view/View;
    invoke-virtual {v7}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lorg/zeam/ItemInfo;

    .line 360
    .local v1, itemInfo:Lorg/zeam/ItemInfo;
    iput v9, v1, Lorg/zeam/ItemInfo;->cellX:I

    .line 362
    iget-object v0, p0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    .line 363
    const-wide/16 v2, -0xc8

    iget v5, v1, Lorg/zeam/ItemInfo;->cellX:I

    move v6, v4

    .line 362
    invoke-static/range {v0 .. v6}, Lorg/zeam/LauncherModel;->moveItemInDatabase(Landroid/content/Context;Lorg/zeam/ItemInfo;JIII)V

    .line 356
    add-int/lit8 v9, v9, 0x1

    goto :goto_0
.end method


# virtual methods
.method public acceptDrop(Lorg/zeam/DragSource;IIIILjava/lang/Object;)Z
    .locals 4
    .parameter "source"
    .parameter "x"
    .parameter "y"
    .parameter "xOffset"
    .parameter "yOffset"
    .parameter "dragInfo"

    .prologue
    .line 77
    move-object v0, p6

    check-cast v0, Lorg/zeam/ItemInfo;

    move-object v1, v0

    .line 78
    .local v1, itemInfo:Lorg/zeam/ItemInfo;
    iget v2, v1, Lorg/zeam/ItemInfo;->itemType:I

    packed-switch v2, :pswitch_data_0

    .line 87
    :pswitch_0
    iget-object v2, p0, Lorg/zeam/Dock;->mScrollView:Landroid/view/View;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/view/View;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 88
    const/4 v2, 0x0

    :goto_0
    return v2

    .line 84
    :pswitch_1
    iget-object v2, p0, Lorg/zeam/Dock;->mScrollView:Landroid/view/View;

    const v3, 0x7f02000b

    invoke-virtual {v2, v3}, Landroid/view/View;->setBackgroundResource(I)V

    .line 85
    const/4 v2, 0x1

    goto :goto_0

    .line 78
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_1
        :pswitch_1
        :pswitch_1
        :pswitch_0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public addItemViews(Ljava/util/ArrayList;)V
    .locals 4
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lorg/zeam/ItemInfo;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 172
    .local p1, itemInfos:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/ItemInfo;>;"
    invoke-static {}, Lorg/zeam/ItemInfo;->createCellXComparator()Ljava/util/Comparator;

    move-result-object v2

    invoke-static {p1, v2}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V

    .line 174
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-lt v0, v2, :cond_0

    .line 182
    return-void

    .line 175
    :cond_0
    invoke-virtual {p1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lorg/zeam/ItemInfo;

    .line 176
    .local v1, itemInfo:Lorg/zeam/ItemInfo;
    iget v2, v1, Lorg/zeam/ItemInfo;->cellX:I

    iget-object v3, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v3}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v3

    if-gt v2, v3, :cond_1

    .line 177
    iget v2, v1, Lorg/zeam/ItemInfo;->cellX:I

    invoke-direct {p0, v1, v2}, Lorg/zeam/Dock;->addItemViewAt(Lorg/zeam/ItemInfo;I)V

    .line 174
    :goto_1
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 179
    :cond_1
    invoke-direct {p0, v1}, Lorg/zeam/Dock;->addItemView(Lorg/zeam/ItemInfo;)V

    goto :goto_1
.end method

.method public estimateDropLocation(Lorg/zeam/DragSource;IIIILjava/lang/Object;Landroid/graphics/Rect;)Landroid/graphics/Rect;
    .locals 1
    .parameter "source"
    .parameter "x"
    .parameter "y"
    .parameter "xOffset"
    .parameter "yOffset"
    .parameter "dragInfo"
    .parameter "recycle"

    .prologue
    .line 97
    const/4 v0, 0x0

    return-object v0
.end method

.method hide(Z)V
    .locals 2
    .parameter "animated"

    .prologue
    .line 521
    if-eqz p1, :cond_0

    .line 522
    invoke-virtual {p0}, Lorg/zeam/Dock;->getContext()Landroid/content/Context;

    move-result-object v0

    .line 523
    .local v0, context:Landroid/content/Context;
    const v1, 0x7f040003

    invoke-static {v0, v1}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;

    move-result-object v1

    invoke-virtual {p0, v1}, Lorg/zeam/Dock;->setAnimation(Landroid/view/animation/Animation;)V

    .line 525
    .end local v0           #context:Landroid/content/Context;
    :cond_0
    const/4 v1, 0x4

    invoke-virtual {p0, v1}, Lorg/zeam/Dock;->setVisibility(I)V

    .line 526
    return-void
.end method

.method isEmpty()Z
    .locals 1

    .prologue
    .line 538
    iget-object v0, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public onDragEnd()V
    .locals 0

    .prologue
    .line 168
    return-void
.end method

.method public onDragEnter(Lorg/zeam/DragSource;IIIILjava/lang/Object;)V
    .locals 0
    .parameter "source"
    .parameter "x"
    .parameter "y"
    .parameter "xOffset"
    .parameter "yOffset"
    .parameter "dragInfo"

    .prologue
    .line 155
    return-void
.end method

.method public onDragExit(Lorg/zeam/DragSource;IIIILjava/lang/Object;)V
    .locals 2
    .parameter "source"
    .parameter "x"
    .parameter "y"
    .parameter "xOffset"
    .parameter "yOffset"
    .parameter "dragInfo"

    .prologue
    .line 161
    iget-object v0, p0, Lorg/zeam/Dock;->mScrollView:Landroid/view/View;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 162
    return-void
.end method

.method public onDragOver(Lorg/zeam/DragSource;IIIILjava/lang/Object;)V
    .locals 0
    .parameter "source"
    .parameter "x"
    .parameter "y"
    .parameter "xOffset"
    .parameter "yOffset"
    .parameter "dragInfo"

    .prologue
    .line 158
    return-void
.end method

.method public onDragStart(Landroid/view/View;Lorg/zeam/DragSource;Ljava/lang/Object;I)V
    .locals 0
    .parameter "v"
    .parameter "source"
    .parameter "info"
    .parameter "dragAction"

    .prologue
    .line 165
    return-void
.end method

.method public onDrop(Lorg/zeam/DragSource;IIIILjava/lang/Object;)V
    .locals 14
    .parameter "source"
    .parameter "x"
    .parameter "y"
    .parameter "xOffset"
    .parameter "yOffset"
    .parameter "dragInfo"

    .prologue
    .line 114
    iget-object v2, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v2}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v7

    .line 115
    .local v7, insertAfter:I
    const/4 v2, -0x1

    move/from16 v0, p2

    move v1, v2

    if-ne v0, v1, :cond_0

    const/4 v2, -0x1

    move/from16 v0, p3

    move v1, v2

    if-eq v0, v1, :cond_1

    .line 116
    :cond_0
    const/4 v12, 0x0

    .local v12, i:I
    :goto_0
    iget-object v2, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v2}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v2

    if-lt v12, v2, :cond_2

    .line 141
    .end local v12           #i:I
    :cond_1
    :goto_1
    iget-object v2, p0, Lorg/zeam/Dock;->mScrollView:Landroid/view/View;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/view/View;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 142
    invoke-static {}, Lorg/zeam/Launcher;->getModel()Lorg/zeam/LauncherModel;

    move-result-object v13

    .line 143
    .local v13, launcherModel:Lorg/zeam/LauncherModel;
    move-object/from16 v0, p6

    check-cast v0, Lorg/zeam/ItemInfo;

    move-object v3, v0

    .line 144
    .local v3, itemInfo:Lorg/zeam/ItemInfo;
    iput v7, v3, Lorg/zeam/ItemInfo;->cellX:I

    .line 146
    invoke-virtual {v13, v3}, Lorg/zeam/LauncherModel;->addDesktopItem(Lorg/zeam/ItemInfo;)V

    .line 147
    invoke-virtual {p0}, Lorg/zeam/Dock;->getContext()Landroid/content/Context;

    move-result-object v2

    .line 148
    const-wide/16 v4, -0xc8

    const/4 v6, -0x1

    const/4 v8, -0x1

    .line 147
    invoke-static/range {v2 .. v8}, Lorg/zeam/LauncherModel;->addOrMoveItemInDatabase(Landroid/content/Context;Lorg/zeam/ItemInfo;JIII)V

    .line 150
    invoke-direct {p0, v3, v7}, Lorg/zeam/Dock;->addItemViewAt(Lorg/zeam/ItemInfo;I)V

    .line 151
    invoke-direct {p0}, Lorg/zeam/Dock;->updateItemsInDatabase()V

    .line 152
    return-void

    .line 117
    .end local v3           #itemInfo:Lorg/zeam/ItemInfo;
    .end local v13           #launcherModel:Lorg/zeam/LauncherModel;
    .restart local v12       #i:I
    :cond_2
    iget-object v2, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v2, v12}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v11

    .line 119
    .local v11, childView:Landroid/view/View;
    const/4 v2, 0x2

    new-array v9, v2, [I

    .line 120
    .local v9, childLocation:[I
    invoke-virtual {v11, v9}, Landroid/view/View;->getLocationOnScreen([I)V

    .line 121
    iget v2, p0, Lorg/zeam/Dock;->mOrientation:I

    const/4 v3, 0x1

    if-ne v2, v3, :cond_4

    const/4 v2, 0x0

    aget v2, v9, v2

    .line 122
    invoke-virtual {v11}, Landroid/view/View;->getWidth()I

    move-result v3

    div-int/lit8 v3, v3, 0x2

    add-int/2addr v2, v3

    move v10, v2

    .line 124
    .local v10, childPosition:I
    :goto_2
    iget v2, p0, Lorg/zeam/Dock;->mOrientation:I

    const/4 v3, 0x1

    if-ne v2, v3, :cond_6

    .line 125
    move/from16 v0, p2

    move v1, v10

    if-le v0, v1, :cond_5

    .line 116
    :cond_3
    add-int/lit8 v12, v12, 0x1

    goto :goto_0

    .line 122
    .end local v10           #childPosition:I
    :cond_4
    const/4 v2, 0x1

    aget v2, v9, v2

    invoke-virtual {v11}, Landroid/view/View;->getHeight()I

    move-result v3

    div-int/lit8 v3, v3, 0x2

    add-int/2addr v2, v3

    move v10, v2

    goto :goto_2

    .line 128
    .restart local v10       #childPosition:I
    :cond_5
    move v7, v12

    .line 129
    goto :goto_1

    .line 132
    :cond_6
    move/from16 v0, p3

    move v1, v10

    if-gt v0, v1, :cond_3

    .line 135
    move v7, v12

    .line 136
    goto :goto_1
.end method

.method public onDropCompleted(Landroid/view/View;Z)V
    .locals 0
    .parameter "target"
    .parameter "success"

    .prologue
    .line 517
    return-void
.end method

.method protected onFinishInflate()V
    .locals 2

    .prologue
    .line 65
    const v0, 0x7f06000d

    invoke-virtual {p0, v0}, Lorg/zeam/Dock;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    .line 66
    const v0, 0x7f06000c

    invoke-virtual {p0, v0}, Lorg/zeam/Dock;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lorg/zeam/Dock;->mScrollView:Landroid/view/View;

    .line 67
    iget-object v0, p0, Lorg/zeam/Dock;->mScrollView:Landroid/view/View;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundColor(I)V

    .line 68
    invoke-super {p0}, Landroid/widget/LinearLayout;->onFinishInflate()V

    .line 69
    return-void
.end method

.method public onLongClick(Landroid/view/View;)Z
    .locals 3
    .parameter "selectedView"

    .prologue
    const/4 v2, 0x0

    .line 237
    iget-object v1, p0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    invoke-virtual {v1}, Lorg/zeam/Launcher;->isApplicationsGridOpen()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 238
    iget-object v1, p0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    invoke-virtual {v1}, Lorg/zeam/Launcher;->closeAllApplications()V

    .line 240
    :cond_0
    iput-object p1, p0, Lorg/zeam/Dock;->mSelectedView:Landroid/view/View;

    .line 241
    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/zeam/ItemInfo;

    .line 242
    .local v0, itemInfo:Lorg/zeam/ItemInfo;
    iget-object v1, p0, Lorg/zeam/Dock;->mDragController:Lorg/zeam/DragController;

    invoke-interface {v1, p1, p0, v0, v2}, Lorg/zeam/DragController;->startDrag(Landroid/view/View;Lorg/zeam/DragSource;Ljava/lang/Object;I)V

    .line 243
    invoke-direct {p0, v2}, Lorg/zeam/Dock;->removeSelectedItem(Z)V

    .line 244
    const/4 v1, 0x1

    return v1
.end method

.method protected onMeasure(II)V
    .locals 8
    .parameter "widthMeasureSpec"
    .parameter "heightMeasureSpec"

    .prologue
    const/16 v7, 0x30

    const/4 v6, 0x3

    const/4 v5, 0x1

    .line 470
    invoke-super {p0, p1, p2}, Landroid/widget/LinearLayout;->onMeasure(II)V

    .line 471
    iget v4, p0, Lorg/zeam/Dock;->mOrientation:I

    if-ne v4, v5, :cond_0

    invoke-virtual {p0}, Lorg/zeam/Dock;->getMeasuredWidth()I

    move-result v4

    move v0, v4

    .line 472
    .local v0, dockSize:I
    :goto_0
    iget v4, p0, Lorg/zeam/Dock;->mOrientation:I

    if-ne v4, v5, :cond_1

    .line 473
    iget-object v4, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->getMeasuredWidth()I

    move-result v4

    move v2, v4

    .line 476
    .local v2, itemHolderSize:I
    :goto_1
    if-nez v2, :cond_2

    .line 513
    :goto_2
    return-void

    .line 471
    .end local v0           #dockSize:I
    .end local v2           #itemHolderSize:I
    :cond_0
    invoke-virtual {p0}, Lorg/zeam/Dock;->getMeasuredHeight()I

    move-result v4

    move v0, v4

    goto :goto_0

    .line 474
    .restart local v0       #dockSize:I
    :cond_1
    iget-object v4, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->getMeasuredHeight()I

    move-result v4

    move v2, v4

    goto :goto_1

    .line 480
    .restart local v2       #itemHolderSize:I
    :cond_2
    iget-object v4, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v3

    check-cast v3, Landroid/widget/FrameLayout$LayoutParams;

    .line 482
    .local v3, layoutParams:Landroid/widget/FrameLayout$LayoutParams;
    if-gt v2, v0, :cond_a

    .line 483
    invoke-virtual {p0}, Lorg/zeam/Dock;->getContext()Landroid/content/Context;

    move-result-object v4

    invoke-static {v4}, Lorg/zeam/PreferencesUtil;->getDockItemAlignment(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    .line 485
    .local v1, itemAlignment:Ljava/lang/String;
    iget v4, p0, Lorg/zeam/Dock;->mOrientation:I

    if-ne v4, v5, :cond_6

    .line 486
    const-string v4, "START"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_3

    .line 487
    iput v6, v3, Landroid/widget/FrameLayout$LayoutParams;->gravity:I

    .line 510
    .end local v1           #itemAlignment:Ljava/lang/String;
    :goto_3
    iget-object v4, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v4, v3}, Landroid/widget/LinearLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 511
    invoke-virtual {p0}, Lorg/zeam/Dock;->postInvalidate()V

    .line 512
    invoke-virtual {p0}, Lorg/zeam/Dock;->requestLayout()V

    goto :goto_2

    .line 488
    .restart local v1       #itemAlignment:Ljava/lang/String;
    :cond_3
    const-string v4, "CENTER"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_4

    .line 489
    iput v5, v3, Landroid/widget/FrameLayout$LayoutParams;->gravity:I

    goto :goto_3

    .line 490
    :cond_4
    const-string v4, "END"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_5

    .line 491
    const/4 v4, 0x5

    iput v4, v3, Landroid/widget/FrameLayout$LayoutParams;->gravity:I

    goto :goto_3

    .line 493
    :cond_5
    iput v5, v3, Landroid/widget/FrameLayout$LayoutParams;->gravity:I

    goto :goto_3

    .line 496
    :cond_6
    const-string v4, "START"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_7

    .line 497
    iput v7, v3, Landroid/widget/FrameLayout$LayoutParams;->gravity:I

    goto :goto_3

    .line 498
    :cond_7
    const-string v4, "CENTER"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_8

    .line 499
    const/16 v4, 0x10

    iput v4, v3, Landroid/widget/FrameLayout$LayoutParams;->gravity:I

    goto :goto_3

    .line 500
    :cond_8
    const-string v4, "END"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_9

    .line 501
    const/16 v4, 0x50

    iput v4, v3, Landroid/widget/FrameLayout$LayoutParams;->gravity:I

    goto :goto_3

    .line 503
    :cond_9
    iput v5, v3, Landroid/widget/FrameLayout$LayoutParams;->gravity:I

    goto :goto_3

    .line 507
    .end local v1           #itemAlignment:Ljava/lang/String;
    :cond_a
    iget v4, p0, Lorg/zeam/Dock;->mOrientation:I

    if-ne v4, v5, :cond_b

    move v4, v6

    :goto_4
    iput v4, v3, Landroid/widget/FrameLayout$LayoutParams;->gravity:I

    goto :goto_3

    :cond_b
    move v4, v7

    goto :goto_4
.end method

.method public removeAllViewsInLayout()V
    .locals 1

    .prologue
    .line 249
    iget-object v0, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->removeAllViewsInLayout()V

    .line 250
    return-void
.end method

.method removeShortcutsForPackage(Ljava/lang/String;)V
    .locals 9
    .parameter "packageName"

    .prologue
    .line 254
    if-nez p1, :cond_1

    .line 278
    :cond_0
    return-void

    .line 257
    :cond_1
    const/4 v4, 0x0

    .local v4, i:I
    :goto_0
    iget-object v8, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v8}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v8

    if-ge v4, v8, :cond_0

    .line 258
    iget-object v8, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v8, v4}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v2

    .line 259
    .local v2, child:Landroid/view/View;
    invoke-virtual {v2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Lorg/zeam/ItemInfo;

    .line 260
    .local v6, itemInfo:Lorg/zeam/ItemInfo;
    if-eqz v6, :cond_2

    instance-of v8, v6, Lorg/zeam/ApplicationItemInfo;

    if-eqz v8, :cond_2

    .line 262
    move-object v0, v6

    check-cast v0, Lorg/zeam/ApplicationItemInfo;

    move-object v1, v0

    .line 263
    .local v1, applicationItemInfo:Lorg/zeam/ApplicationItemInfo;
    iget-object v5, v1, Lorg/zeam/ApplicationItemInfo;->intent:Landroid/content/Intent;

    .line 264
    .local v5, intent:Landroid/content/Intent;
    if-eqz v5, :cond_2

    .line 265
    invoke-virtual {v5}, Landroid/content/Intent;->getComponent()Landroid/content/ComponentName;

    move-result-object v3

    .line 266
    .local v3, componentName:Landroid/content/ComponentName;
    if-eqz v3, :cond_2

    .line 267
    invoke-virtual {v3}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;

    move-result-object v7

    .line 268
    .local v7, packageName1:Ljava/lang/String;
    if-eqz v7, :cond_2

    .line 269
    invoke-virtual {v7, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v8

    if-eqz v8, :cond_2

    .line 270
    iput-object v2, p0, Lorg/zeam/Dock;->mSelectedView:Landroid/view/View;

    .line 271
    const/4 v8, 0x1

    invoke-direct {p0, v8}, Lorg/zeam/Dock;->removeSelectedItem(Z)V

    .line 257
    .end local v1           #applicationItemInfo:Lorg/zeam/ApplicationItemInfo;
    .end local v3           #componentName:Landroid/content/ComponentName;
    .end local v5           #intent:Landroid/content/Intent;
    .end local v7           #packageName1:Ljava/lang/String;
    :cond_2
    add-int/lit8 v4, v4, 0x1

    goto :goto_0
.end method

.method scrollReset()V
    .locals 8

    .prologue
    const/16 v7, 0x21

    const/16 v5, 0x11

    const/4 v6, 0x0

    .line 436
    invoke-virtual {p0}, Lorg/zeam/Dock;->getContext()Landroid/content/Context;

    move-result-object v4

    invoke-static {v4}, Lorg/zeam/PreferencesUtil;->getDockResetTo(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    .line 438
    .local v1, resetTo:Ljava/lang/String;
    iget-object v4, p0, Lorg/zeam/Dock;->mScrollView:Landroid/view/View;

    instance-of v4, v4, Landroid/widget/HorizontalScrollView;

    if-eqz v4, :cond_4

    .line 439
    iget-object v0, p0, Lorg/zeam/Dock;->mScrollView:Landroid/view/View;

    check-cast v0, Landroid/widget/HorizontalScrollView;

    .line 441
    .local v0, hScrollView:Landroid/widget/HorizontalScrollView;
    const-string v4, "START"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_1

    .line 442
    invoke-virtual {v0, v5}, Landroid/widget/HorizontalScrollView;->fullScroll(I)Z

    .line 465
    .end local v0           #hScrollView:Landroid/widget/HorizontalScrollView;
    :cond_0
    :goto_0
    return-void

    .line 443
    .restart local v0       #hScrollView:Landroid/widget/HorizontalScrollView;
    :cond_1
    const-string v4, "CENTER"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_2

    .line 444
    iget-object v4, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->getMeasuredWidth()I

    move-result v4

    invoke-virtual {p0}, Lorg/zeam/Dock;->getMeasuredWidth()I

    move-result v5

    sub-int/2addr v4, v5

    div-int/lit8 v2, v4, 0x2

    .line 445
    .local v2, scrollTo:I
    invoke-virtual {v0, v2, v6}, Landroid/widget/HorizontalScrollView;->smoothScrollTo(II)V

    goto :goto_0

    .line 446
    .end local v2           #scrollTo:I
    :cond_2
    const-string v4, "END"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_3

    .line 447
    const/16 v4, 0x42

    invoke-virtual {v0, v4}, Landroid/widget/HorizontalScrollView;->fullScroll(I)Z

    goto :goto_0

    .line 449
    :cond_3
    invoke-virtual {v0, v5}, Landroid/widget/HorizontalScrollView;->fullScroll(I)Z

    goto :goto_0

    .line 451
    .end local v0           #hScrollView:Landroid/widget/HorizontalScrollView;
    :cond_4
    iget-object v4, p0, Lorg/zeam/Dock;->mScrollView:Landroid/view/View;

    instance-of v4, v4, Landroid/widget/ScrollView;

    if-eqz v4, :cond_0

    .line 452
    iget-object v3, p0, Lorg/zeam/Dock;->mScrollView:Landroid/view/View;

    check-cast v3, Landroid/widget/ScrollView;

    .line 454
    .local v3, scrollView:Landroid/widget/ScrollView;
    const-string v4, "START"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_5

    .line 455
    invoke-virtual {v3, v7}, Landroid/widget/ScrollView;->fullScroll(I)Z

    goto :goto_0

    .line 456
    :cond_5
    const-string v4, "CENTER"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_6

    .line 457
    iget-object v4, p0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    invoke-virtual {v4}, Landroid/widget/LinearLayout;->getMeasuredHeight()I

    move-result v4

    invoke-virtual {p0}, Lorg/zeam/Dock;->getMeasuredHeight()I

    move-result v5

    sub-int/2addr v4, v5

    div-int/lit8 v2, v4, 0x2

    .line 458
    .restart local v2       #scrollTo:I
    invoke-virtual {v3, v6, v2}, Landroid/widget/ScrollView;->smoothScrollTo(II)V

    goto :goto_0

    .line 459
    .end local v2           #scrollTo:I
    :cond_6
    const-string v4, "END"

    invoke-virtual {v1, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_7

    .line 460
    const/16 v4, 0x82

    invoke-virtual {v3, v4}, Landroid/widget/ScrollView;->fullScroll(I)Z

    goto :goto_0

    .line 462
    :cond_7
    invoke-virtual {v3, v7}, Landroid/widget/ScrollView;->fullScroll(I)Z

    goto :goto_0
.end method

.method public sendDrop(Lorg/zeam/ItemInfo;)V
    .locals 1
    .parameter "itemInfo"

    .prologue
    .line 101
    const/4 v0, -0x1

    invoke-virtual {p0, p1, v0}, Lorg/zeam/Dock;->sendDrop(Lorg/zeam/ItemInfo;I)V

    .line 102
    return-void
.end method

.method public sendDrop(Lorg/zeam/ItemInfo;I)V
    .locals 7
    .parameter "itemInfo"
    .parameter "position"

    .prologue
    const/4 v3, -0x1

    .line 105
    const/4 v1, 0x0

    move-object v0, p0

    move v2, p2

    move v4, v3

    move v5, v3

    move-object v6, p1

    invoke-virtual/range {v0 .. v6}, Lorg/zeam/Dock;->onDrop(Lorg/zeam/DragSource;IIIILjava/lang/Object;)V

    .line 106
    return-void
.end method

.method public setDragger(Lorg/zeam/DragController;)V
    .locals 0
    .parameter "dragController"

    .prologue
    .line 59
    iput-object p1, p0, Lorg/zeam/Dock;->mDragController:Lorg/zeam/DragController;

    .line 60
    return-void
.end method

.method setItemWidth(I)V
    .locals 6
    .parameter "width"

    .prologue
    .line 411
    packed-switch p1, :pswitch_data_0

    .line 432
    :goto_0
    :pswitch_0
    return-void

    .line 413
    :pswitch_1
    const-wide v2, 0x4046f9999999999aL

    .line 422
    .local v2, spacing:D
    :goto_1
    iget-object v4, p0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    invoke-virtual {v4}, Lorg/zeam/Launcher;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    .line 423
    .local v0, displayMetrics:Landroid/util/DisplayMetrics;
    iget v4, v0, Landroid/util/DisplayMetrics;->density:F

    float-to-double v4, v4

    mul-double/2addr v4, v2

    double-to-int v1, v4

    .line 424
    .local v1, size:I
    iget v4, p0, Lorg/zeam/Dock;->mOrientation:I

    const/4 v5, 0x1

    if-ne v4, v5, :cond_0

    .line 426
    iput v1, p0, Lorg/zeam/Dock;->mCellWidth:I

    .line 430
    :goto_2
    invoke-virtual {p0}, Lorg/zeam/Dock;->invalidate()V

    .line 431
    invoke-virtual {p0}, Lorg/zeam/Dock;->requestLayout()V

    goto :goto_0

    .line 416
    .end local v0           #displayMetrics:Landroid/util/DisplayMetrics;
    .end local v1           #size:I
    .end local v2           #spacing:D
    :pswitch_2
    const-wide/high16 v2, 0x4050

    .line 417
    .restart local v2       #spacing:D
    goto :goto_1

    .line 428
    .restart local v0       #displayMetrics:Landroid/util/DisplayMetrics;
    .restart local v1       #size:I
    :cond_0
    iput v1, p0, Lorg/zeam/Dock;->mCellHeight:I

    goto :goto_2

    .line 411
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method

.method setLauncher(Lorg/zeam/Launcher;)V
    .locals 0
    .parameter "launcher"

    .prologue
    .line 405
    iput-object p1, p0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    .line 406
    return-void
.end method

.method show(Z)V
    .locals 2
    .parameter "animated"

    .prologue
    .line 530
    if-eqz p1, :cond_0

    .line 531
    invoke-virtual {p0}, Lorg/zeam/Dock;->getContext()Landroid/content/Context;

    move-result-object v0

    .line 532
    .local v0, context:Landroid/content/Context;
    const v1, 0x7f040002

    invoke-static {v0, v1}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;

    move-result-object v1

    invoke-virtual {p0, v1}, Lorg/zeam/Dock;->setAnimation(Landroid/view/animation/Animation;)V

    .line 534
    .end local v0           #context:Landroid/content/Context;
    :cond_0
    const/4 v1, 0x0

    invoke-virtual {p0, v1}, Lorg/zeam/Dock;->setVisibility(I)V

    .line 535
    return-void
.end method

.method updateShortcutsForPackage(Ljava/lang/String;)V
    .locals 18
    .parameter "packageName"

    .prologue
    .line 282
    if-nez p1, :cond_1

    .line 348
    :cond_0
    return-void

    .line 285
    :cond_1
    const/4 v8, 0x0

    .local v8, i:I
    :goto_0
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    move-object/from16 v16, v0

    invoke-virtual/range {v16 .. v16}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v16

    move v0, v8

    move/from16 v1, v16

    if-ge v0, v1, :cond_0

    .line 286
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/Dock;->mItemHolder:Landroid/widget/LinearLayout;

    move-object/from16 v16, v0

    move-object/from16 v0, v16

    move v1, v8

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v13

    .line 287
    .local v13, itemView:Landroid/view/View;
    invoke-virtual {v13}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v12

    check-cast v12, Lorg/zeam/ItemInfo;

    .line 289
    .local v12, itemInfo:Lorg/zeam/ItemInfo;
    move-object v0, v12

    instance-of v0, v0, Lorg/zeam/ApplicationItemInfo;

    move/from16 v16, v0

    if-eqz v16, :cond_4

    .line 291
    move-object v0, v12

    check-cast v0, Lorg/zeam/ApplicationItemInfo;

    move-object v10, v0

    .line 292
    .local v10, info:Lorg/zeam/ApplicationItemInfo;
    iget-object v11, v10, Lorg/zeam/ApplicationItemInfo;->intent:Landroid/content/Intent;

    .line 293
    .local v11, intent:Landroid/content/Intent;
    invoke-virtual {v11}, Landroid/content/Intent;->getComponent()Landroid/content/ComponentName;

    move-result-object v14

    .line 295
    .local v14, name:Landroid/content/ComponentName;
    move-object v0, v10

    iget v0, v0, Lorg/zeam/ApplicationItemInfo;->itemType:I

    move/from16 v16, v0

    if-eqz v16, :cond_2

    .line 296
    move-object v0, v10

    iget v0, v0, Lorg/zeam/ApplicationItemInfo;->itemType:I

    move/from16 v16, v0

    const/16 v17, 0x1

    move/from16 v0, v16

    move/from16 v1, v17

    if-ne v0, v1, :cond_3

    .line 297
    :cond_2
    const-string v16, "android.intent.action.MAIN"

    invoke-virtual {v11}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v17

    invoke-virtual/range {v16 .. v17}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v16

    if-eqz v16, :cond_3

    if-eqz v14, :cond_3

    .line 298
    invoke-virtual {v14}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;

    move-result-object v16

    move-object/from16 v0, p1

    move-object/from16 v1, v16

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v16

    if-eqz v16, :cond_3

    .line 300
    invoke-static {}, Lorg/zeam/Launcher;->getModel()Lorg/zeam/LauncherModel;

    move-result-object v16

    .line 301
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Lorg/zeam/Launcher;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v17

    .line 300
    move-object/from16 v0, v16

    move-object/from16 v1, v17

    move-object v2, v10

    invoke-virtual {v0, v1, v2}, Lorg/zeam/LauncherModel;->getApplicationItemInfoIconOrNull(Landroid/content/pm/PackageManager;Lorg/zeam/ApplicationItemInfo;)Landroid/graphics/drawable/Drawable;

    move-result-object v9

    .line 303
    .local v9, icon:Landroid/graphics/drawable/Drawable;
    if-eqz v9, :cond_3

    move-object v0, v10

    iget-object v0, v0, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    move-object/from16 v16, v0

    move-object v0, v9

    move-object/from16 v1, v16

    if-eq v0, v1, :cond_3

    .line 305
    const/16 v16, 0x1

    move/from16 v0, v16

    move-object v1, v10

    iput-boolean v0, v1, Lorg/zeam/ApplicationItemInfo;->filtered:Z

    .line 306
    move-object v0, v10

    iget-object v0, v0, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    move-object/from16 v16, v0

    const/16 v17, 0x0

    invoke-virtual/range {v16 .. v17}, Landroid/graphics/drawable/Drawable;->setCallback(Landroid/graphics/drawable/Drawable$Callback;)V

    .line 307
    invoke-virtual/range {p0 .. p0}, Lorg/zeam/Dock;->getContext()Landroid/content/Context;

    move-result-object v16

    move-object v0, v9

    move-object/from16 v1, v16

    invoke-static {v0, v1}, Lorg/zeam/Utilities;->createIconThumbnail(Landroid/graphics/drawable/Drawable;Landroid/content/Context;)Landroid/graphics/drawable/Drawable;

    move-result-object v16

    move-object/from16 v0, v16

    move-object v1, v10

    iput-object v0, v1, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    .line 308
    check-cast v13, Landroid/widget/ImageView;

    .end local v13           #itemView:Landroid/view/View;
    move-object v0, v10

    iget-object v0, v0, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    move-object/from16 v16, v0

    invoke-virtual/range {p0 .. p0}, Lorg/zeam/Dock;->getContext()Landroid/content/Context;

    move-result-object v17

    invoke-static/range {v16 .. v17}, Lorg/zeam/Utilities;->drawReflection(Landroid/graphics/drawable/Drawable;Landroid/content/Context;)Landroid/graphics/drawable/Drawable;

    move-result-object v16

    move-object v0, v13

    move-object/from16 v1, v16

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 285
    .end local v9           #icon:Landroid/graphics/drawable/Drawable;
    .end local v10           #info:Lorg/zeam/ApplicationItemInfo;
    .end local v11           #intent:Landroid/content/Intent;
    .end local v14           #name:Landroid/content/ComponentName;
    :cond_3
    add-int/lit8 v8, v8, 0x1

    goto/16 :goto_0

    .line 311
    .restart local v13       #itemView:Landroid/view/View;
    :cond_4
    move-object v0, v12

    instance-of v0, v0, Lorg/zeam/UserFolderInfo;

    move/from16 v16, v0

    if-eqz v16, :cond_3

    .line 313
    move-object v0, v12

    check-cast v0, Lorg/zeam/UserFolderInfo;

    move-object v10, v0

    .line 314
    .local v10, info:Lorg/zeam/UserFolderInfo;
    iget-object v5, v10, Lorg/zeam/UserFolderInfo;->contents:Ljava/util/ArrayList;

    .line 315
    .local v5, applicationItemInfos:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/ApplicationItemInfo;>;"
    invoke-virtual {v5}, Ljava/util/ArrayList;->size()I

    move-result v4

    .line 317
    .local v4, applicationItemInfoCount:I
    const/4 v15, 0x0

    .local v15, y:I
    :goto_1
    if-ge v15, v4, :cond_3

    .line 319
    invoke-virtual {v5, v15}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lorg/zeam/ApplicationItemInfo;

    .line 320
    .local v3, applicationItemInfo:Lorg/zeam/ApplicationItemInfo;
    iget-object v11, v3, Lorg/zeam/ApplicationItemInfo;->intent:Landroid/content/Intent;

    .line 321
    .restart local v11       #intent:Landroid/content/Intent;
    invoke-virtual {v11}, Landroid/content/Intent;->getComponent()Landroid/content/ComponentName;

    move-result-object v14

    .line 323
    .restart local v14       #name:Landroid/content/ComponentName;
    move-object v0, v3

    iget v0, v0, Lorg/zeam/ApplicationItemInfo;->itemType:I

    move/from16 v16, v0

    if-eqz v16, :cond_5

    .line 324
    move-object v0, v3

    iget v0, v0, Lorg/zeam/ApplicationItemInfo;->itemType:I

    move/from16 v16, v0

    const/16 v17, 0x1

    move/from16 v0, v16

    move/from16 v1, v17

    if-ne v0, v1, :cond_7

    .line 325
    :cond_5
    const-string v16, "android.intent.action.MAIN"

    invoke-virtual {v11}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v17

    invoke-virtual/range {v16 .. v17}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v16

    if-eqz v16, :cond_7

    if-eqz v14, :cond_7

    .line 326
    invoke-virtual {v14}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;

    move-result-object v16

    move-object/from16 v0, p1

    move-object/from16 v1, v16

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v16

    if-eqz v16, :cond_7

    .line 328
    invoke-static {}, Lorg/zeam/Launcher;->getModel()Lorg/zeam/LauncherModel;

    move-result-object v16

    .line 329
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    move-object/from16 v17, v0

    invoke-virtual/range {v17 .. v17}, Lorg/zeam/Launcher;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v17

    .line 328
    move-object/from16 v0, v16

    move-object/from16 v1, v17

    move-object v2, v3

    invoke-virtual {v0, v1, v2}, Lorg/zeam/LauncherModel;->getApplicationItemInfoIconOrNull(Landroid/content/pm/PackageManager;Lorg/zeam/ApplicationItemInfo;)Landroid/graphics/drawable/Drawable;

    move-result-object v9

    .line 331
    .restart local v9       #icon:Landroid/graphics/drawable/Drawable;
    const/4 v7, 0x0

    .line 332
    .local v7, folderUpdated:Z
    if-eqz v9, :cond_6

    move-object v0, v3

    iget-object v0, v0, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    move-object/from16 v16, v0

    move-object v0, v9

    move-object/from16 v1, v16

    if-eq v0, v1, :cond_6

    .line 333
    move-object v0, v3

    iget-object v0, v0, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    move-object/from16 v16, v0

    const/16 v17, 0x0

    invoke-virtual/range {v16 .. v17}, Landroid/graphics/drawable/Drawable;->setCallback(Landroid/graphics/drawable/Drawable$Callback;)V

    .line 334
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    move-object/from16 v16, v0

    move-object v0, v9

    move-object/from16 v1, v16

    invoke-static {v0, v1}, Lorg/zeam/Utilities;->createIconThumbnail(Landroid/graphics/drawable/Drawable;Landroid/content/Context;)Landroid/graphics/drawable/Drawable;

    move-result-object v16

    move-object/from16 v0, v16

    move-object v1, v3

    iput-object v0, v1, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    .line 335
    const/16 v16, 0x1

    move/from16 v0, v16

    move-object v1, v3

    iput-boolean v0, v1, Lorg/zeam/ApplicationItemInfo;->filtered:Z

    .line 336
    const/4 v7, 0x1

    .line 338
    :cond_6
    if-eqz v7, :cond_7

    .line 339
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/Dock;->mLauncher:Lorg/zeam/Launcher;

    move-object/from16 v16, v0

    invoke-virtual/range {v16 .. v16}, Lorg/zeam/Launcher;->getWorkspace()Lorg/zeam/Workspace;

    move-result-object v16

    invoke-virtual/range {v16 .. v16}, Lorg/zeam/Workspace;->getOpenFolder()Lorg/zeam/Folder;

    move-result-object v6

    .line 340
    .local v6, folder:Lorg/zeam/Folder;
    if-eqz v6, :cond_7

    .line 341
    invoke-virtual {v6}, Lorg/zeam/Folder;->notifyDataSetChanged()V

    .line 317
    .end local v6           #folder:Lorg/zeam/Folder;
    .end local v7           #folderUpdated:Z
    .end local v9           #icon:Landroid/graphics/drawable/Drawable;
    :cond_7
    add-int/lit8 v15, v15, 0x1

    goto/16 :goto_1
.end method
